﻿using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;

namespace YJKRevitAxisModule
{
	public partial class AxisNameForm : System.Windows.Forms.Form
	{
		public string NewName { get; set; }

		public AxisNameForm()
		{
			this.InitializeComponent();
		}

		private void btnOK_Click(object sender, EventArgs e)
		{
			this.NewName = this.textBoxName.Text;
		}

		private void AxisNameForm_FormClosing(object sender, FormClosingEventArgs e)
		{
			string text = this.textBoxName.Text;
			if (text.CompareTo("") == 0 || text.CompareTo("i") == 0 || text.CompareTo("I") == 0 || text.CompareTo("o") == 0 || text.CompareTo("O") == 0)
			{
				MessageBox.Show("轴线名不能为空或者以下字符：i、I、o和O");
				e.Cancel = true;
			}
		}
	}
}
